import request from '@/libs/axios'

export const permission = params => {
  return request({
    url: '/permissions',
    method: 'get',
    params: params
  })
}

export const topClass = params => {
  return request({
    url: '/top/class',
    method: 'get',
    params: params
  })
}

export const addPermission = params => {
  return request({
    url: '/permissions',
    method: 'post',
    data: params
  })
}

export const editPermission = params => {
  return request({
    url: '/permissions/' + params.id,
    method: 'put',
    data: params
  })
}

export const deletePermission = params => {
  return request({
    url: '/permissions/' + params.id,
    method: 'delete',
    data: params
  })
}
